;; -*- mode: emacs-lisp -*-

(if (and
     (< emacs-major-version 24)
     (not (require 'package nil t))
     (not (file-exists-p (concat plugins-dir "package.el"))))
    ;; (if (not (package-built-in-p 'package))
    (progn
      (require 'url)
      (let ((package-el-url "http://repo.or.cz/w/emacs.git/blob_plain/1a0a666f941c99882093d7bd08ced15033bc3f0c:/lisp/emacs-lisp/package.el"))
	(util/download-file-from-url package-el-url plugins-dir))
      (require 'package)
      ))

;; set ELPA variable
(setq package-user-dir (concat basimplemacs-dir "elpa/"))
;; (add-to-list 'package-archives
;; 	     '("marmalade" . "http://marmalade-repo.org/packages/")
;; 	     '("ELPA" . "http://tromey.com/elpa/")
;; 	     '("gnu" . "http://elpa.gnu.org/packages/")
;; 	     '("SC" . "http://joseito.republika.pl/sunrise-commander/")
;; 	     )
;; (setq package-archives
;;       (concatenate 'list
;; 		   package-archives
;; 		   '(("ELPA" . "http://tromey.com/elpa/")
;; 		     ("gnu" . "http://elpa.gnu.org/packages/")
;; 		     ("SC" . "http://joseito.republika.pl/sunrise-commander/")
;; 		     ("marmalade" . "http://marmalade-repo.org/packages/"))))

(setq package-archives
      '(("ELPA" . "http://tromey.com/elpa/")
	("gnu" . "http://elpa.gnu.org/packages/")
	("SC" . "http://joseito.republika.pl/sunrise-commander/")
	("marmalade" . "http://marmalade-repo.org/packages/")))


(provide 'conf-package)
